package com.flying.invest.assets.model;

import java.util.Date;

import com.flying.framework.data.Data;
import com.flying.common.util.Codes;
import com.flying.framework.annotation.ConstantEnum;
import com.flying.framework.annotation.Param;
import com.flying.framework.data.DataSerializable;
import com.flying.framework.metadata.Meta;
import com.flying.invest.assets.model.Assets.Status;

@SuppressWarnings("serial")
@Meta(id="i_assets_favorite",title="投资品种收藏", table="i_assets_favorite", primaryKeys={"favorite_id"})
public class AssetsFavorite extends Data implements DataSerializable {
	public final static String ENTITY_NAME = "i_assets_favorite";
	
	public final static String FAVORITE_ID = "favorite_id";
	public final static String ASSETS_ID = "assets_id";
	public final static String USER_ID = "user_id";
	public final static String NAME = "name";
	public final static String REMARKS = "remarks";
	public final static String STATUS = "status";
	public final static String TERM_TYPE = "term_type";
	public final static String CREATOR = "creator";
	public final static String CREATE_TIME = "create_time";
	public final static String UPDATOR = "updator";
	public final static String UPDATE_TIME = "update_time";
	
	public enum Status implements ConstantEnum<Integer> {
		INVALID(0, "不在用"), VALID(1, "在用");

		public final int value;
		public final String remarks;

		Status(int value, String remarks) {
			this.value = value;
			this.remarks = remarks;
		}
		
		@Override
		public Integer value() {
			return this.value;
		}

		@Override
		public String text() {
			return remarks;
		}
	}
	
	@Param(value=FAVORITE_ID,   required=true,   maxlength=0,	desc="ID" , generator=Codes.AUTO_INCREMENT)
	private Long favoriteId;
	
	@Param(value=ASSETS_ID,   required=true,   maxlength=0,	desc="产品ID" )
	private Long assetsId;
	
	@Param(value=USER_ID,   required=false,   maxlength=0,	desc="用户ID" )
	private Long userId;
	
	@Param(value=NAME,   required=false,   maxlength=50,	desc="名称" )
	private String name;
	
	@Param(value=REMARKS,   required=false,   maxlength=400,	desc="说明" )
	private String remarks;
	
	@Param(value=STATUS,   required=false,   maxlength=0,	desc="状态（0：无效；1：有效）", enumClass=Status.class )
	private Integer status;
	
	@Param(value=TERM_TYPE,   required=false,   maxlength=0,	desc="投资周期" )
	private Integer termType;
	
	@Param(value=CREATOR,   required=false,   maxlength=40,	desc="创建人" )
	private String creator;
	
	@Param(value=CREATE_TIME,   required=false,   maxlength=0,	desc="创建时间" )
	private Date createTime;
	
	@Param(value=UPDATOR,   required=false,   maxlength=40,	desc="修改人" )
	private String updator;
	
	@Param(value=UPDATE_TIME,   required=false,   maxlength=0,	desc="更新时间" )
	private Date updateTime;
	
	
	public Long getFavoriteId() {
		return this.favoriteId;
	}
	
	public void setFavoriteId(Long itemId) {
		this.favoriteId = itemId;
	}
	
	public Long getAssetsId() {
		return this.assetsId;
	}
	
	public void setAssetsId(Long assetsId) {
		this.assetsId = assetsId;
	}
	
	public Long getUserId() {
		return this.userId;
	}
	
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getRemarks() {
		return this.remarks;
	}
	
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getCreator() {
		return this.creator;
	}
	
	public void setCreator(String creator) {
		this.creator = creator;
	}
	
	public Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getUpdator() {
		return this.updator;
	}
	
	public void setUpdator(String updator) {
		this.updator = updator;
	}
	
	public Date getUpdateTime() {
		return this.updateTime;
	}
	
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	

}